package com.ganle.service;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;

import com.ganle.dao.DwDeliveryDetailMapper;
import com.ganle.domain.DwDeliveryDetail;

@Service
public class DwDeliveryDetailService {
	@Autowired 
	DwDeliveryDetailMapper dwDeliveryDetailMapper;
	
	public int i = 0;
	
	public DwDeliveryDetail selectOne(Integer id) {
		return  dwDeliveryDetailMapper.selectByPrimaryKey(id);
	};
	
	@org.springframework.transaction.annotation.Transactional 
	public void hander(DwDeliveryDetail dwDeliveryDetail1, DwDeliveryDetail dwDeliveryDetail2){
		
		dwDeliveryDetailMapper.insertSelective(dwDeliveryDetail1);
		if(1==1)
			throw new RuntimeException("te");
		dwDeliveryDetailMapper.insertSelective(dwDeliveryDetail2);
	}
}
